import Tkinter

window = Tkinter.Tk()
window.title( "Hello Python Tkinter" )
window.mainloop()

filenameVar = StringVar()
entry = Entry( window, width = 100, textvariable = filenameVar )
entry.pack()
filenameVar.set( "Hello World" )
print filenameVar.get()